/**
 * class : Chatcontroller, using constructor pattern
 * 
 * 
 */
function ChatController() {
	this.data = {};
	this.init = function(user, msg) {
		this.data.username = user.username;
		this.data.msg = msg;
	};
	this.showData = function() {

	};
	this.sendData = function(url, type, dataType, action, ajaxData) {
		var ajaxObj = new AjaxObj();// call object to init ajax request
		var request = ajaxObj.ajax(type, url, dataType, action, ajaxData);
		request.done(function(resp) { // show data after recevie data from
			console.log(resp);
		});
		request.fail(function(error) {

		})
	};

};
